; CiAll : Does CI automatically for an application
; To make it work, you will have first to initialize with :
; Day2Var lastciAppName
; where AppName is the name of your application
; The Day2Var program makes two environnement variables storing the current
; date and the current time and use the given prefix for their name
Day2Var Now
; this scripts are created automatically but could also be stored
; permanently in S:, they are required because lformat arguments
; and variable contents are expanded in the first call.
Echo CiAll for {AppName}
; GetDate stores the date of the given file into the variable ftime
; It is now a C program
; RecDate changes the given file date with the contents of the variable ftime
; It is now a C program
; WaitMore will keep the process waiting until the More command is finished.
Echo > RAM:WaitMore "Lab Check*NStatus > NIL: COM=More*NIf NOT WARN*NWait 5 SECS*NSkip BACK Check*NEndif"
Protect RAM:WaitMore +s
; Due to C:List limitation we cannot check both date and time so we check
; which variable to use
IF $Nowdate EQ $lastci{AppName}date
SetEnv CheckIt $lastci{AppName}time
Else
SetEnv CheckIt $lastci{AppName}date
Endif
; This complicate list command does :
; - seeks for .c or .h files
; - look only the files modified since $CheckIt
; - creates a script file named ram:aze
; The script file does :
; - rcsdiff on the file
; - display the results with RUN:more (for having a separate window,
; else use only more)
; - get the file date
; - operates ci -l on the file (then the file date has changed)
; - restore the file date
list > ram:aze PAT=#?.(cc|h) SINCE $CheckIt LFORMAT "rcsdiff %P%N > ram:bre*NRUN more ram:bre*Ngetdate %P%N ftime*NWaitMore*N ci -l %P%N*Nrecdate %P%N ftime"
execute ram:aze
; supposing you have multiple directories, you have to cd
; and replicate the command
cd include
list > ram:aze PAT=#?.(h) SINCE $CheckIt LFORMAT "rcsdiff %P%N > ram:bre*NRUN more ram:bre*Ngetdate %P%N ftime*NWaitMore*N ci -l %P%N*Nrecdate %P%N ftime"
execute ram:aze
cd gadgets
list > ram:aze PAT=#?.(h) SINCE $CheckIt LFORMAT "rcsdiff %P%N > ram:bre*NRUN more ram:bre*Ngetdate %P%N ftime*NWaitMore*N ci -l %P%N*Nrecdate %P%N ftime"